<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
		<title>Axios应用程序</title>
	</head>
	<body>
		<div id="app">
			<div>
				名称：{{info.name}}
			</div>
			<div>
				url：{{info.url}}
			</div>
			<ul>
				<li v-for = "link in info.links">
					{{link.name}}--->{{link.url}}
				</li>
			</ul>
		</div>
		<script>
			var app = new Vue({
				el:"#app",
				data(){
					return{
						info:{
							name:'',
							url:'',
							links:[]
						}
					}
				},
				mounted(){
					axios
						.get('data.json')
						.then(response => this.info = response.data)
				}
			})
		</script>
	</body>
</html>